package com.yq.cp.mapper.yw;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yq.cp.entity.yw.YwGdxx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yq.cp.entity.yw.vo.YwGdxxVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 运维-工单信息 Mapper 接口
 * </p>
 *
 * @author zh
 * @since 2024-09-07
 */
public interface YwGdxxMapper extends BaseMapper<YwGdxx> {

    @Delete("DELETE FROM t_yw_gdxx WHERE id=#{id}")
    Long sc(Long id);

    IPage<YwGdxx> page(IPage<YwGdxx> ipage,@Param("v") YwGdxxVo vo);


    List<Map<String,Object>> ccggry(Long id);
    List<Map<String,Object>> ccggry1(@Param("id") Long id,@Param("zdId") Long zdId);
    List<Map<String,Object>> ccggry2(@Param("id") Long id,@Param("zdId")Long zdId);

    @Update("UPDATE t_yw_gdxx SET nzzt=0,nzr_id=null,slr_id=null,jsnzr_id=#{userId} WHERE id=#{id}")
    Long xgxx(@Param("id")Long id,@Param("userId")Long userId);

    @Update("UPDATE t_yw_gdxx SET clnzzt=0,jsclr_id=null,clr_id=null,clslr_id=#{userId},hxzt=2 WHERE id=#{id}")
    Long xgxxCl(@Param("id")Long id,@Param("userId")Long userId);
}
